package com.guigu.springcloud.controller;

import com.guigu.springcloud.common.CommonResult;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/payment")
public class PaymentController {

    @Value("${server.port}")
    private String serverPort;

    @GetMapping
    public String index() {
        return "Hello World";
    }

    @GetMapping(value = "/zk")
    public CommonResult getServerPort() {
        return new CommonResult(200, "查询数据", "springcloud with zookeeper: " + serverPort);
    }
}
